home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / bootbat.arc / BOOT1.ASM < prev    next >
Encoding:
Assembly Source File  |  1986-09-23  |  3.6 KB  |  57 lines

  1.                  Page      60,132
  2. TITLE            BOOT1     Quick-boot for IBM-PC with hard disk
  3. ;
  4. ;*************************************************************************
  5. ;*                         QUICKBOOT - .COM Format coding                *
  6. ;*                         ---------                                     *
  7. ;*                                                                       *
  8. ;*    This program causes a warm boot on an IBM-PC.  It's primary        *
  9. ;*      advantage is that it bypasses the routines that reset the        *
  10. ;*      hard disk controller, thereby saving approximately 15-30         *
  11. ;*      seconds.  This comes in handy when experimenting with            *
  12. ;*      various AUTOEXEC or CONFIG.SYS changes.                          *
  13. ;*                                                                       *
  14. ;*    In addition, comparing this file with BOOT2.ASM shows the          *
  15. ;*      novice ASM programmer how to generate code in both the EXE       *
  16. ;*      and COM file formats.  After assembling and linking this         *
  17. ;*      version, use the command EXE2BIN BOOT1.EXE BOOT1.COM to generate *
  18. ;*      the executable .COM file.  Notice how much smaller the .COM      *
  19. ;*      version is compared to the .EXE version (97 vs. 686 bytes)!      *
  20. ;*                                                                       *
  21. ;*************************************************************************
  22. ;
  23. CODESEG          SEGMENT   
  24.                  Assume    CS:CODESEG, DS:CODESEG, ES:CODESEG, SS:CODESEG
  25.                  Org       100H   ;All COM format progs must be org'ed 100H
  26. Entry:           Jmp       BEGIN               ;Jump over data declarations
  27. ;--------------------------------------------------------------------------
  28. ;********* Data Declarations Area **********
  29. MESSAGE1         db        'Q U I C K B O O T',0dH,0aH,'$'
  30. MESSAGE2         db        'by Brad Stephenson',0dH,0aH,'$'
  31. ;--------------------------------------------------------------------------
  32. BEGIN:           mov       ah,08               ;Set up to 
  33.                  mov       bh,00               ; ask BIOS what colors
  34.                  int       10H                 ; are currently set
  35.                  mov       bh,ah               ;Set up to 
  36.                  mov       ax,0600H            ; clear screen
  37.                  mov       cx,0000             ; to pre-existing
  38.                  mov       dx,184fH            ; colors.
  39.                  int       10H                 ;Call BIOS scroll function
  40.                  mov       ah,02               ;Set up to position
  41.                  mov       bh,00               ; cursor
  42.                  mov       dx,0520H            ; at row 5, column 32
  43.                  int       10H                 ;Call BIOS cursor pos. func.
  44.                  mov       dx,Offset MESSAGE1  ;Print program name
  45.                  mov       ah,9                ; at cursor
  46.                  int       21H                 ;Call DOS string disp. func.
  47.                  mov       ah,02               ;Set up to position
  48.                  mov       bh,00               ; cursor
  49.                  mov       dx,0e1fH            ; at row 14, column 31
  50.                  int       10H                 ;Call BIOS cursor pos. func.
  51.                  mov       dx,Offset MESSAGE2  ;Print programmer's name
  52.                  mov       ah,9                ; at cursor position
  53.                  int       21H                 ;Call DOS string disp. func.
  54.                  int       19H                 ;Reboot
  55. CODESEG          EndS
  56.                  End       ENTRY
  57.